package com.lmabbe.core.service.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lmabbe.core.common.entitys.SysUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * @author lmabbe
 */
@Mapper
public interface SysUserMapper extends BaseMapper<SysUser> {

    /**
     * 根据账号查找
     *
     * @param userAccount 账号
     * @return
     */
    SysUser findUserAccount(@Param("userAccount") String userAccount);

    /**
     * 根据电话号码加载用户
     *
     * @param mobile
     * @return
     */
    @Select(value = "select * from sys_user where user_mobile = #{mobile}")
    SysUser findByUserMobile(@Param("mobile") String mobile);
}